define.template({
    type: 'Section',
    node: {
        type: 'Vertical',
        nodes: [
            // 搜索栏
            {
                type: 'Form',
                pub: {colSpan: 4},
                nodes: [
                    {type: 'Text', name: 'userName', label: {text: '姓名'}},
                    {type: 'Text', name: 'loginName', label: {text: '登录名'}},
                    {
                        type: 'RadioGroup', name: 'gender', label: {text: '性别'}, nodes: [
                            {value: '', text: '全部', checked: true},
                            {value: '1', text: '男'},
                            {value: '2', text: '女'}
                        ]
                    }
                ]
            },
            // 列表
            {
                type: 'Table', id: 'table', height: '*',
                columns: [
                    {field: 'box', width: 40, format: 'javascript:return {type: "TripleBox", name: "selectItem", value: $userId};'},
                    {field: 'userName', width: '*'},
                    {field: 'loginName', width: 200},
                    {field: 'genderName', width: 80, align: 'center'},
                    {field: 'telephone', width: 140, align: 'center'},
                    {field: 'email', width: 200},
                    {field: 'userStatusName', width: 100, align: 'center'},
                    {field: 'operation', width: 90, align: 'center',
                        format: '<a href="javascript:;" onclick="$.widget(this).cmd(\'edit\',\'$userId\');">查看</a>' +
                            '&nbsp;&nbsp;<a href="javascript:;" onclick="$.widget(this).cmd(\'delete\',\'$userId\');">删除</a>'}
                ],
                tHead: {
                    nodes: [
                        {
                            'box': {type: 'TripleBox', name: 'selectItem', checkAll: true},
                            'userName': '姓名',
                            'loginName': '登录名',
                            'genderName': '性别',
                            'telephone': '手机',
                            'email': '邮箱',
                            'userStatusName': '状态',
                            'operation': '操作',
                        }
                    ]
                },
                tBody: {
                    '@nodes': '$data'
                }
            },
            // 分页栏
            {
                type: 'PageBar', id: 'pageBar', align: 'right', buttonCount: 5,
                src: 'javascript:this.cmd("search",$0);',
                '@currentPage': '$header.offset/$header.limit+1',
                '@sumPage': '($header.size-1)/$header.limit+1'
            }
        ]
    }
});